package com.cpecc.model.wuzi;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;

import com.cpecc.model.system.BiZhong;
import com.cpecc.model.system.Dep;
import com.cpecc.model.system.ShiYongZT;
import com.cpecc.model.system.User;
import com.cpecc.model.system.WuZiLB;
import com.cpecc.model.system.ZheJiuFS;

@Entity
@Table(name = "DATA_WUZI")
public class WuZi implements Serializable{
	private static final long serialVersionUID = 2686390038293462298L;

	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(length = 32)
	private String id;
	
	@Column(length=32)
	private String ziChanBH;
	
	@Column(length=32)
	private String wuLiaoBM;
	
	@Column(length=32)
	private String ziChanBM;
	
	@Column(length=32)
	private String wuZiMC;
	
	@Column(length=32)
	private String pinPai;
	
	@Column(length=32)
	private String shengChanCJ;
	
	@Column(length=32)
	private String chanPinXLH;
	
	@ManyToOne
	@JoinColumn(name="WUZILB_ID")
	private WuZiLB wuZiLB;
	
	@Column(length=32)
	private String guiGeXH;
	
	@Column(length=32)
	private String gongYingShangMC;
	
	@Column
	private Date gouMaiRQ;
	
	@Column
	private Date daoHuoRQ;
	
	@Column
	private Date baoXiuJZRQ;	
	
	@Column
	private Date ruKuRQ;
	
	@Column(length=16)
	private String zengJiaFS;
	
	@Column
	private Date chuKuRQ;
	
	@Column
	private double wuZiYZ;
	
	@Column
	private float jingCanZhiLv;
	
	@Column
	private double wuZiJingZhi;
	
	@Column
	private Integer baoFeiYX;
	
	@Column
	private int zheJiuYX;
	
	@ManyToOne
	@JoinColumn(name="ZHEJIU_ID")
	private ZheJiuFS zheJiuFS;
	
	@Column
	private int zheJiuYS;
	
	@Column
	private double leiJiZJJE;
	
	@ManyToOne
	@JoinColumn(name="BIZHONG_ID")
	private BiZhong biZhong;
	
	@Column
	private Integer wuZiLX;
	
	@Column
	private Integer panDian;
	
	@Column
	private Date panDianRQ;
	
	@Column(length=50)
	private String cunFangD;
	
	@ManyToOne
	@JoinColumn(name="DEP_ID")
	private Dep dep;
	
	@ManyToOne
	@JoinColumn(name="USER_ID")
	private User user;
	
	@ManyToOne
	@JoinColumn(name="GUANLIDEP_ID")
	private Dep guanLiBM;
	
	@Column(length=500)
	private String beiZhu;
	
	@Column
	private Date kaiShiJiTiRQ;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "parentID")
	private WuZi parent;
	
	@ManyToOne
	@JoinColumn(name="SHIYONGZT_ID")
	private ShiYongZT shiYongZT;
	
	@OneToMany(mappedBy="parent")
	@LazyCollection(LazyCollectionOption.EXTRA)
	private Set<WuZi> child;
	
	@OneToMany(mappedBy="wuZi")
	@LazyCollection(LazyCollectionOption.EXTRA)
	private Set<ShenQing> shenQing;
	
	@OneToMany(mappedBy="wuZi")
	@LazyCollection(LazyCollectionOption.EXTRA)
	private Set<TuPian> tuPians;
	
	@OneToMany(mappedBy="parent")
	@LazyCollection(LazyCollectionOption.EXTRA)
	private Set<WuZi> childs;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "caiMaiRID")
	private User caiMaiR;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getZiChanBH() {
		return ziChanBH;
	}

	public void setZiChanBH(String ziChanBH) {
		this.ziChanBH = ziChanBH;
	}

	public String getWuLiaoBM() {
		return wuLiaoBM;
	}

	public void setWuLiaoBM(String wuLiaoBM) {
		this.wuLiaoBM = wuLiaoBM;
	}

	public String getWuZiMC() {
		return wuZiMC;
	}

	public void setWuZiMC(String wuZiMC) {
		this.wuZiMC = wuZiMC;
	}

	public String getPinPai() {
		return pinPai;
	}

	public void setPinPai(String pinPai) {
		this.pinPai = pinPai;
	}

	public String getShengChanCJ() {
		return shengChanCJ;
	}

	public void setShengChanCJ(String shengChanCJ) {
		this.shengChanCJ = shengChanCJ;
	}

	public String getChanPinXLH() {
		return chanPinXLH;
	}

	public void setChanPinXLH(String chanPinXLH) {
		this.chanPinXLH = chanPinXLH;
	}

	public WuZiLB getWuZiLB() {
		return wuZiLB;
	}

	public void setWuZiLB(WuZiLB wuZiLB) {
		this.wuZiLB = wuZiLB;
	}

	public String getGuiGeXH() {
		return guiGeXH;
	}

	public void setGuiGeXH(String guiGeXH) {
		this.guiGeXH = guiGeXH;
	}

	public String getGongYingShangMC() {
		return gongYingShangMC;
	}

	public void setGongYingShangMC(String gongYingShangMC) {
		this.gongYingShangMC = gongYingShangMC;
	}

	public Date getGouMaiRQ() {
		return gouMaiRQ;
	}

	public void setGouMaiRQ(Date gouMaiRQ) {
		this.gouMaiRQ = gouMaiRQ;
	}

	public Date getBaoXiuJZRQ() {
		return baoXiuJZRQ;
	}

	public void setBaoXiuJZRQ(Date baoXiuJZRQ) {
		this.baoXiuJZRQ = baoXiuJZRQ;
	}	

	public ShiYongZT getShiYongZT() {
		return shiYongZT;
	}

	public void setShiYongZT(ShiYongZT shiYongZT) {
		this.shiYongZT = shiYongZT;
	}

	public Date getRuKuRQ() {
		return ruKuRQ;
	}

	public void setRuKuRQ(Date ruKuRQ) {
		this.ruKuRQ = ruKuRQ;
	}

	public String getZengJiaFS() {
		return zengJiaFS;
	}

	public void setZengJiaFS(String zengJiaFS) {
		this.zengJiaFS = zengJiaFS;
	}

	public Date getChuKuRQ() {
		return chuKuRQ;
	}

	public void setChuKuRQ(Date chuKuRQ) {
		this.chuKuRQ = chuKuRQ;
	}

	public double getWuZiYZ() {
		return wuZiYZ;
	}

	public void setWuZiYZ(double wuZiYZ) {
		this.wuZiYZ = wuZiYZ;
	}

	public float getJingCanZhiLv() {
		return jingCanZhiLv;
	}

	public void setJingCanZhiLv(float jingCanZhiLv) {
		this.jingCanZhiLv = jingCanZhiLv;
	}

	public double getWuZiJingZhi() {
		return wuZiJingZhi;
	}

	public void setWuZiJingZhi(double wuZiJingZhi) {
		this.wuZiJingZhi = wuZiJingZhi;
	}

	public ZheJiuFS getZheJiuFS() {
		return zheJiuFS;
	}
	
	public void setZheJiuFS(ZheJiuFS zheJiuFS) {
		this.zheJiuFS = zheJiuFS;
	}

	public int getZheJiuYS() {
		return zheJiuYS;
	}

	public void setZheJiuYS(int zheJiuYS) {
		this.zheJiuYS = zheJiuYS;
	}

	public double getLeiJiZJJE() {
		return leiJiZJJE;
	}

	public void setLeiJiZJJE(double leiJiZJJE) {
		this.leiJiZJJE = leiJiZJJE;
	}

	public BiZhong getBiZhong() {
		return biZhong;
	}

	public void setBiZhong(BiZhong biZhong) {
		this.biZhong = biZhong;
	}

	public Integer getWuZiLX() {
		return wuZiLX;
	}

	public void setWuZiLX(Integer wuZiLX) {
		this.wuZiLX = wuZiLX;
	}

	public Integer getPanDian() {
		return panDian;
	}

	public void setPanDian(Integer panDian) {
		this.panDian = panDian;
	}

	public String getCunFangD() {
		return cunFangD;
	}

	public void setCunFangD(String cunFangD) {
		this.cunFangD = cunFangD;
	}

	public Dep getDep() {
		return dep;
	}

	public void setDep(Dep dep) {
		this.dep = dep;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public WuZi getParent() {
		return parent;
	}

	public void setParent(WuZi parent) {
		this.parent = parent;
	}

	public Set<WuZi> getChild() {
		return child;
	}

	public void setChild(Set<WuZi> child) {
		this.child = child;
	}	

	public Date getDaoHuoRQ() {
		return daoHuoRQ;
	}

	public void setDaoHuoRQ(Date daoHuoRQ) {
		this.daoHuoRQ = daoHuoRQ;
	}	

	public Set<ShenQing> getShenQing() {
		return shenQing;
	}

	public void setShenQing(Set<ShenQing> shenQing) {
		this.shenQing = shenQing;
	}	
	
	public Date getPanDianRQ() {
		return panDianRQ;
	}

	public void setPanDianRQ(Date panDianRQ) {
		this.panDianRQ = panDianRQ;
	}

	public Set<TuPian> getTuPians() {
		return tuPians;
	}

	public void setTuPians(Set<TuPian> tuPians) {
		this.tuPians = tuPians;
	}	

	public Set<WuZi> getChilds() {
		return childs;
	}

	public void setChilds(Set<WuZi> childs) {
		this.childs = childs;
	}
	
	public Dep getGuanLiBM() {
		return guanLiBM;
	}

	public void setGuanLiBM(Dep guanLiBM) {
		this.guanLiBM = guanLiBM;
	}

	public String getBeiZhu() {
		return beiZhu;
	}

	public void setBeiZhu(String beiZhu) {
		this.beiZhu = beiZhu;
	}

	public String getZiChanBM() {
		return ziChanBM;
	}

	public void setZiChanBM(String ziChanBM) {
		this.ziChanBM = ziChanBM;
	}	

	public Date getKaiShiJiTiRQ() {
		return kaiShiJiTiRQ;
	}

	public void setKaiShiJiTiRQ(Date kaiShiJiTiRQ) {
		this.kaiShiJiTiRQ = kaiShiJiTiRQ;
	}	

	public User getCaiMaiR() {
		return caiMaiR;
	}

	public void setCaiMaiR(User caiMaiR) {
		this.caiMaiR = caiMaiR;
	}

	public Integer getBaoFeiYX() {
		return baoFeiYX;
	}

	public void setBaoFeiYX(Integer baoFeiYX) {
		this.baoFeiYX = baoFeiYX;
	}

	public int getZheJiuYX() {
		return zheJiuYX;
	}

	public void setZheJiuYX(int zheJiuYX) {
		this.zheJiuYX = zheJiuYX;
	}

	public WuZi(String id, String ziChanBH, String wuLiaoBM, String ziChanBM,
			String wuZiMC, String pinPai, String shengChanCJ,
			String chanPinXLH, WuZiLB wuZiLB, String guiGeXH,
			String gongYingShangMC, Date gouMaiRQ, Date daoHuoRQ,
			Date baoXiuJZRQ, Date ruKuRQ, String zengJiaFS, Date chuKuRQ,
			double wuZiYZ, float jingCanZhiLv, double wuZiJingZhi,
			Integer baoFeiYX, int zheJiuYX, ZheJiuFS zheJiuFS, int zheJiuYS,
			double leiJiZJJE, BiZhong biZhong, int wuZiLX, int panDian,
			Date panDianRQ, String cunFangD, Dep dep, User user, Dep guanLiBM,
			String beiZhu, Date kaiShiJiTiRQ, WuZi parent, ShiYongZT shiYongZT,
			Set<WuZi> child, Set<ShenQing> shenQing, Set<TuPian> tuPians,
			Set<WuZi> childs, User caiMaiR) {
		super();
		this.id = id;
		this.ziChanBH = ziChanBH;
		this.wuLiaoBM = wuLiaoBM;
		this.ziChanBM = ziChanBM;
		this.wuZiMC = wuZiMC;
		this.pinPai = pinPai;
		this.shengChanCJ = shengChanCJ;
		this.chanPinXLH = chanPinXLH;
		this.wuZiLB = wuZiLB;
		this.guiGeXH = guiGeXH;
		this.gongYingShangMC = gongYingShangMC;
		this.gouMaiRQ = gouMaiRQ;
		this.daoHuoRQ = daoHuoRQ;
		this.baoXiuJZRQ = baoXiuJZRQ;
		this.ruKuRQ = ruKuRQ;
		this.zengJiaFS = zengJiaFS;
		this.chuKuRQ = chuKuRQ;
		this.wuZiYZ = wuZiYZ;
		this.jingCanZhiLv = jingCanZhiLv;
		this.wuZiJingZhi = wuZiJingZhi;
		this.baoFeiYX = baoFeiYX;
		this.zheJiuYX = zheJiuYX;
		this.zheJiuFS = zheJiuFS;
		this.zheJiuYS = zheJiuYS;
		this.leiJiZJJE = leiJiZJJE;
		this.biZhong = biZhong;
		this.wuZiLX = wuZiLX;
		this.panDian = panDian;
		this.panDianRQ = panDianRQ;
		this.cunFangD = cunFangD;
		this.dep = dep;
		this.user = user;
		this.guanLiBM = guanLiBM;
		this.beiZhu = beiZhu;
		this.kaiShiJiTiRQ = kaiShiJiTiRQ;
		this.parent = parent;
		this.shiYongZT = shiYongZT;
		this.child = child;
		this.shenQing = shenQing;
		this.tuPians = tuPians;
		this.childs = childs;
		this.caiMaiR = caiMaiR;
	}

	public WuZi() {
		super();
	}
}
